<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateThirdAppsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        /**
         *   `id` int(11) NOT NULL AUTO_INCREMENT,
        `app_id` varchar(64) NOT NULL COMMENT '应用app_id',
        `app_secret` varchar(64) NOT NULL COMMENT '应用secret',
        `app_description` varchar(100) DEFAULT NULL COMMENT '应用程序描述',
        `scope` varchar(20) NOT NULL COMMENT '应用权限',
        `scope_description` varchar(100) DEFAULT NULL COMMENT '权限描述',
         */
        Schema::create('third_apps', function (Blueprint $table) {
            $table->increments('id');
            $table->string('app_id', 62);
            $table->string('app_secret');
            $table->string('app_description');
            $table->string('scope');
            $table->string('scope_description');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('third_apps');
    }
}
